/* ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 
*   Copyright 2014 Jan-Marwin Wollschläger                                   *
*                                                                            *
*   Licensed under the Apache License, Version 2.0 (the "License");          *
*   you may not use this file except in compliance with the License.         *
*   You may obtain a copy of the License at                                  *
*                                                                            *
*       http://www.apache.org/licenses/LICENSE-2.0                           *
*                                                                            *
*   Unless required by applicable law or agreed to in writing, software      *
*   distributed under the License is distributed on an "AS IS" BASIS,        *
*   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
*   See the License for the specific language governing permissions and      *
*   limitations under the License.                                           *
** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **  */ 

/**
 * The interface for the two-dimensional vectors that will be used throughout
 * this application.
 *
 * @author Jan-Marwin Wollschläger
 * @version 0.1
 **/
public interface IVector2
{
   /**
   * @return Returns the x coordinate of this Vector2 instance.
   **/
   public float getX();
   
    /**
   * @return Returns the y coordinate of this Vector2 instance.
   **/
   public float getY();
   
    /**
   * Sets the x coordinate of this Vector2 instance. 
   * @param X The new x coordinate.
   **/
   public void setX(float X);
   
    /**
   * Sets the y coordinate of this Vector2 instance. 
   * @param Y The new y coordinate.
   **/
   public void setY(float Y); 
   
   /**
   * Returns this instance plus amountToSubtract:
   * 	this (+) amountToSubtract,   
   * where (+) means componentwise addition.
   * @return The vector as IVector2 instance after applying
   * componentwise addition as described above.
   **/
   public IVector2 vecPlus(IVector2 toAdd);
   
   /**
   * Returns this instance minus amountToSubtract:
   * 	this (-) amountToSubtract,   
   * where (-) means componentwise subtraction.
   * @return The vector as IVector2 instance after applying
   * componentwise subtraction as described above.
   **/
   public IVector2 vecMinus(IVector2 amountToSubtract);
   
   /**
   * @param scalar The scalar to multiply by.
   *  
   * @return The vector multiplied via the specified scalar.
   **/
   public IVector2 mult(float scalar);
   
   /**
   * @return The length of this vector.
   **/
   public float getLen(); 
   
   /**
   * @return The squared length of this vector.
   **/
   public float getLenSquared();
   
    /**
   * @return Returns a vector that is orthogonal to the direction of
   * this instance.
   **/
   public IVector2 getOrthogonal();
   
   /**
   * Returns a vector that has only positive components.
   **/
   public IVector2 absVec();
   
   /**
   * Returns the distance to the other vector as a float.
   * @param otherVec The vector to measure the distance to.
   * @return The distance of this distance to otherVec as a float. 
   **/
   public float dist(IVector2 otherVec);
}
